import { AxiosRequestConfig } from "axios";
import axios from "../common/plugins/axios";

export const requests = (options: AxiosRequestConfig) => {
  return axios({ method: "post", ...options });
};

export const get = (options: AxiosRequestConfig) => {
  return axios({ method: "get", ...options });
};

export const put = (options: AxiosRequestConfig) => {
  return axios({ method: "put", ...options });
};

export const remove = (options: AxiosRequestConfig) => {
  return axios({ method: "delete", ...options });
};

export const API = {
  user:{
    login:"/users/login",           //用户登陆
    register:"/users/register",   
  },
  goods:{
    all:"/goods/all",               //查询商品表
    product:"/goods",               //新增商品
  }
};
